﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SBattleResult extends IMessageBase
    {
        public var playerA:SMiniPlayer;
        public var playerB:SMiniPlayer;
        public var winerPlayer:SEntityId;
        public const _type:int = 183;
        public static var _regist:SBattleResult = new SBattleResult(true);

        public function SBattleResult(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SBattleResult();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.playerA.__write(param1);
            this.playerB.__write(param1);
            this.winerPlayer.__write(param1);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.playerA = new SMiniPlayer();
            this.playerA.__read(param1);
            this.playerB = new SMiniPlayer();
            this.playerB.__read(param1);
            this.winerPlayer = new SEntityId();
            this.winerPlayer.__read(param1);
            return;
        }// end function

    }
}
